package com.cxm.homework6.proxyFactoryBean;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class UserDaoAspect implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {

        check();
        Object obj = methodInvocation.proceed();
        log();

        return obj;
    }

    public void check(){
        System.out.println("checking user");
    }
    public void log(){
        System.out.println("logging");
    }
}
